package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28779
 * Date: 2023-04-01
 * Time: 9:28
 */
public class BookList {   //书架  用数组来代替
    private Book[] books = new Book[10];
    private int useSize;   //记录当前书架上有几本书

    public BookList(){
        books[0] = new Book("三国演义","罗贯中",19,"小说");
        books[1] = new Book("西游记","吴承恩",29,"小说");
        books[2] = new Book("水浒传","施耐庵",8,"小说");
        this.useSize = 3;
    }

    public Book getBook(int pos){
        return books[pos];
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }
}
